1. Field of the Invention
The present invention relates to a color picker utilized in computer graphic art design.
2. Description of the Prior Art
Graphic art design software, such as desktop publishing software, uses advanced techniques for accurately reproducing colors. However, tools utilized by graphic art design software for editing colors, both single colors and sets of related colors, are still fairly primitive. This is true despite the existence of sophisticated color design principles in the graphic arts.
Graphic art design software for working with colors on a computer system is configured to maintain color fidelity between an input device and an output device. A color in such graphic art design software is specified as a set of coordinates in a color space. A color space is typically defined by three attributes, namely, source transform, destination transform and boundary. The source transform is an algorithm that converts a color from a first color space to a second device-neutral color space. The destination transform is an algorithm that converts a color in the second device-neutral color space into a third color space. The source transform and the destination transform coact to convert a color from the first color space to the third color space, and vice versa, via the second device-neutral color space. The most commonly used second device-neutral color space is CIE XYZ, a device-independent color space configured to represent every color perceivable by the human visual system. The boundary is an imaginary surface defining the limit of legal colors in the color space. The boundary of each color space is related to the range of colors producible by a device, such as a color monitor, color printer or color scanner, represented by the color space of the device or the limitation of human vision.
Graphic art design software includes a color picker which enables each color in an image to be adjusted. Preferably, the color picker includes an interface that displays a range of producible colors in terms of a perceptual color space. The perceptual color space can be depicted as a three-dimensional, double or dual-cone having the color white represented by a point of one cone and having the color black represented by a point of the other cone. The cone having the point representing the color white diverges conically therefrom toward the color black and the cone having the point representing the color black diverges conically therefrom toward the color white. The conical divergence of the two cones meet intermediate the points representing the colors white and black.
A color within the perceptual color space can be characterized in polar coordinates. Specifically, the perceptual color space has a central axis representing lightness which extends between the points at opposite ends of the dual-cone. The radial distance from the lightness axis represents saturation and the angle around the lightness axis represents hue.
A typical color picker enables an artist to work within the perceptual color space by providing a graphical interface that enables selection of a plane in the perceptual color space. For example, the graphical interface of one color picker enables the artist to select a desired hue by moving a slider on a hue color bar representing hue. Adjacent the hue color bar, the color picker displays the range of colors of the perceptual color space in a saturation-lightness plane for the selected hue. The artist then moves a computer icon in the saturation-lightness plane and selects a point therein corresponding to a color to be displayed in a select part of an image.
The graphical interface of another color picker includes a hue circle surrounding a triangle representing a saturation-lightness plane. In this color picker, the artist selects a desired hue by moving a computer icon to a desired position in the hue circle. Thereafter, the artist moves another computer icon in the saturation-lightness triangle and selects a point therein corresponding to a color to be displayed in a select part of the image.
The graphical interface of yet another color picker includes a slider on a lightness bar and an adjacent hue-saturation circle. In this color picker, the artist moves the slider to a desired position on the lightness bar. Then the artist moves a computer icon in the saturation-hue circle and selects a point therein corresponding to a color to be displayed in a select part of the image.
As discussed above, a second device-independent color space is utilized to transform colors from a first color space to a third color space. To change a color in the third color space utilizing a graphical interface in the first color space, two color transforms are required. Namely, a first color transform between the first color space and the second device-independent color space, and a second color transform between the second device-independent color space and the third color space. Moreover, in order to depict colors represented in the third color space in the user interface of the first color space, two additional color transforms are necessary between the third color space and the first color space. Hence, when editing colors in a third color space utilizing a graphic interface in a first color space, four color transforms are necessary between the various color spaces in order to affect a change of a color in a third color space based upon a graphical interface representation of this color in the first color space.
A problem with using prior art color pickers is that each color transform introduces numerical error into the color transformations. This error affects the fidelity of the colors displayed in the first color space or produced in the third color space. Another problem with using prior art color pickers is that they do not enable one color in a color space to be changed as a function of another color in the color space, thereby maintaining a desired relationship, i.e., hue, saturation and/or lightness, therebetween. Still another problem with prior art color pickers is that their graphical user interfaces do not permit visualization of relationships between colors in an image.
It is, therefore, an object of the present invention to overcome the above problems and others by providing a method for adjusting one or more colors in one or more color spaces utilizing techniques for modeling physical systems, e.g., a particle simulator. It is an object of the present invention to provide a method for reducing the number of color transforms over prior art color pickers. It is an object of the present invention to provide a method for relating two or more colors in one or more color spaces so that a change to one color produces a desired change to the other related colors. It is an object of the present invention to provide an apparatus for performing the foregoing methods. Still other objects of the present invention will become apparent to those of ordinary skill in the art upon reading and understanding the following detailed description.
Accordingly, I have invented a method of adjusting color in a color space of a device. The method includes adjusting a first color to a second color in a first color space and subjecting the adjustment from the first color to the second color in the first color space to (i) one or more objectives for the adjustment of the first color in the first color space to the second color in the first color space; (ii) one or more constraints for the adjustment of the first color in the first color space to the second color in the first color space; and/or (iii) one or more constraints between the adjustment from the first color to the second color in the first color space and an adjustment of a corresponding first color in a second color space to a second color in the second color space.
The step of subjecting the adjustment can include the steps of converting the adjustment from the first color to the second color in the first color space to an adjustment of the first color to the second color in the second color space and determining for the adjustments in the first color space and/or the second color space a change of the first and second colors thereof that does not violate the one or more constraints.
I have also invented a method of adjusting a color in a color space. The method includes determining a state vector including a first plurality of scalar values which define a first color in a first color space. An objective function is determined for desired change of the first plurality of scalar values. A partial derivative of the objective function with respect to a derivative of the state vector is determined to obtain an objective vector. The objective vector defines a change to the first plurality of scalar values which minimizes the objective function. The objective vector and the state vector are combined to obtain a change of the first color related to the desired change.
The method can also include mapping the first plurality of scalar values in the first color space to a first plurality of scalar values in a second color space to define a second color therein. The second color corresponds to the first color. The objective function is determined for the desired change in the first plurality of scalar values in the second color space.
The method can also include imposing a constraint on changes to the first plurality of scalar values and determining a constraint function and a constraint vector corresponding to the imposed constraint. A partial derivative of the constraint vector with respect to the state vector can be determined. The partial derivative defines a change to the state vector which does not violate the constraint function. The first plurality of scalar values can be changed as a function of the desired change to the first plurality of scalar values and as a function of the constraint vector.
The method can also include the steps of including in the state vector a second plurality of scalar values which define a second color in a second color space. A constraint function is determined between the first plurality of scalar values and the second plurality of scalar values. A partial derivative of the constraint function with respect to the state vector is determined to obtain a constraint vector which defines a change to the state vector which does not violate the constraint function. The second plurality of scalar values is changed as a function of the desired change to the first plurality of scalar values and as a function of the constraint vector whereby the second color changes as a function of the change to the first color. The first plurality of scalar values and the second plurality of scalar values can be mapped into a third color space. The constraint function can be determined between the first plurality of scalar values and the second plurality of scalar values in the third color space. The partial derivative of the constraint function is determined with respect to the first and second pluralities of scalar values in the respective first and second color spaces to obtain therefor the constraint vector which defines the change to the state vector which does not violate the constraint function between the first and second pluralities of scalar values in the third color space.
I have also invented a method of adjusting color in a color space that includes defining a first color in a first color space and defining a second color in a second color space. The first color in the first color space and the second color in the second color space are transformed into a corresponding first and second colors in the third color space. A constraint is defined between the first color and the second color in the third color space. Changing the first color in the first color space causes the second color in the second color space to change as a function of the change to the first color in the first color space and as a function of the constraint.
The method can also include determining a partial derivative of the constraint with respect to the first and second colors in the respective first and second color spaces and determining from the partial derivative of the constraint at least one change in the first and second colors in the respective first and second color spaces which does not violate the constraint. The second color in the second color space is changed as a function of the change of the first color in the first color space and as a function of the at least one change.
I have also invented a method of adjusting a color in a color space that includes determining a state vector including a first plurality of scalar values corresponding to a first color in a first color space. An objective function is determined for a desired change of the first plurality of scalar values corresponding to a desired change of the first color. An objective vector is determined from the objective function. The objective vector defines a change to the state vector which minimizes the objective function. The state vector and the objective vector are combined to obtain the desired change to the first color.
The method can also include imposing a constraint on changes to the first plurality of scalar values and determining a constraint function and a constraint vector corresponding to the imposed constraint. A partial derivative of the constraint vector with respect to the state vector can be determined. The partial derivative defines a change to the state vector which does not violate the constraint function. The first plurality of scalar values can be changed as a function of the desired change to the first plurality of scalar values and as a function of the constraint vector.
A color space constraint function can be determined between the first plurality of scalar values and a second plurality of scalar values of the state vector. The second plurality of scalar values define a second color in the first color space. A color space constraint vector is determined from the color space constraint function. The color space constraint vector defines a change in the state vector which does not violate the constraint function. The second plurality of scalar values is changed as a function of the change to the first plurality of scalar values and as a function of the color space constraint vector whereby the second color changes as a function of the desired change to the first color.
The state vector can include a third plurality of scalar values which define a third color in a second color space. A movement constraint function can be determined between the first plurality of scalar values and the third plurality of scalar values. A movement constraint vector is determined from the movement constraint function. The movement constraint vector defines at least one change in at least one of the first and third pluralities of scalar values which does not violate the movement constraint function. The third plurality of scalar values is changed as a function of the change to the first plurality of scalar values and as a function of the movement constraint vector whereby the third color changes as a function of the change to the first color.
I have also invented an apparatus for adjusting a color in a color space that includes a state vector determining means for determining a state vector including a first plurality of scalar values which define a first color in a first color space. An objective function determining means determines an objective function for a desired change of the first plurality of scalar values. An objective vector determining means determines a partial derivative of the objective function with respect to a derivative of the state vector to obtain an objective vector which defines a change to the first plurality of scalar values which minimizes the objective function. A combining means combines the objective vector and the state vector to obtain the desired change of the first color.
The apparatus can include a mapping means for mapping the first plurality of scalar values in the first color space to a first plurality of scalar values in a second color space to define a second color therein. The second color corresponds to the first color. The objective function determining means determines the objective function for the desired change in the first plurality of scalar values in the second color space.
The apparatus can include an imposing means for imposing a constraint on changes to the first plurality of scalar values. A constraint determining means determines a constraint function and a constraint vector corresponding to the imposed constraint. A partial derivative determining means determines a partial derivative of the constraint vector with respect to the state vector. The partial derivative defines a change to the state vector which does not violate the constraint function. A changing means changes the first plurality of scalar values as a function of the desired change to the first plurality of scalar values and as a function of the constraint vector.
The apparatus can include a state vector including means for including in the state vector a second plurality of scalar values which define a second color in a second color space. A constraint function determining means can determine a constraint function between the first plurality of scalar values and the second plurality of scalar values. A constraint vector determining means can determine a partial derivative of the constraint function with respect to the state vector to obtain therefor a constraint vector which defines a change in the state vector which does not violate the constraint function. A changing means can change the second plurality of scalar values as a function of the desired change to the first plurality of scalar values and as a function of the constraint vector whereby the second color changes as a function of the change of the first color.
The constraint function determining means can map the first and second pluralities of scalar values into a third color space. The constraint function can be determined between the first plurality of scalar values and the second plurality of scalar values in the third color space. The constraint vector determining means can determine the partial derivative of the mapping of the first and second pluralities of scalar values in the third color space.
I have also invented an apparatus for adjusting a color in a color space that includes a state vector determining means for determining a state vector including a first plurality of scalar values corresponding to a first color in a first color space. An objective function determining means determines an objective function for a desired change of the first plurality of scalar values corresponding to a desired change of the first color. An objective vector determining means determines from the objective function an objective vector which defines a change to the state vector which minimizes the objective function. A combining means combines the state vector and the objective vector to obtain the desired change of the first color.
The apparatus can include an imposing means for imposing a constraint on changes to the first plurality of scalar values. A constraint determining means determines a constraint function and a constraint vector corresponding to the imposed constraint. A partial derivative determining means determines a partial derivative of the constraint vector with respect to the state vector. The partial derivative defines a change to the state vector which does not violate the constraint function. A changing means changes the first plurality of scalar values as a function of the desired change to the first plurality of scalar values and as a function of the constraint vector.
A color space constraint function determining means can determine a color space constraint function between the first plurality of scalar values and a second plurality of scalar values of the state vector. The second plurality of scalar values define a second color in the first color space. A color space constraint vector determining means can determine for the color space constraint function a color space constraint vector which defines a change in the state vector which does not violate the constraint function. A changing means can change the second plurality of scalar values as a function of the change to the first plurality of scalar values and as a function of the color space constraint vector whereby the second color changes as a function of the change to the first color.
The apparatus can have an including means which includes in the state vector a third plurality of scalar values which define a third color in a second color space. A movement constraint determining means can determine at least one movement constraint function between the first plurality of scalar values and the third plurality of scalar values. A movement constraint vector determining means can determine for the movement constraint function a movement constraint vector which defines at least one change in at least one of the first and third pluralities of scalar values which does not violate the movement constraint function. The changing means can change the third plurality of scalar values as a function of the change to the first plurality of scalar values and as a function of the movement constraint vector whereby the third color changes as a function of the change to the first color.
The movement constraint determining means can map the first and second pluralities of scalar values into a third color space and can determine the movement constraint function between the first plurality of scalar values and the second plurality of scalar values in the third color space. The movement constraint vector determining means can determine the movement constraint function with respect to the mappings of the first and second pluralities of scalar values in the third color space.
I have also invented a method of adjusting a color in a color space that includes determining a state vector including a first plurality of scalar values corresponding to a first color in a first color space. The first plurality of scalar values are mapped to a second plurality of scalar values in a second color space to define a second color therein. An objective function is determined for a desired change of the second plurality of scalar values in the second color space corresponding to a desired change of the second color. An objective vector is determined from the objective function. The objective vector defines a change to the state vector which minimizes the objective function. The state vector and the objective vector are combined to obtain a change to the first color corresponding to the desired change of the second color.
Lastly, I have invented an apparatus for adjusting a color in a color space that includes a state vector determining means for determining a state vector which includes a first plurality of scalar values corresponding to a first color in a first color space. A mapping means maps the first plurality of scalar values to a second plurality of scalar values in a second color space to define a second color therein. An objective function determining means determines an objective function for a desired change of the second plurality of scalar values in the second color space corresponding to a desired change of the second color. An objective vector determining means determines from the objective function an objective vector. The objective vector defines a change to the state vector which minimizes the objective function. A combining means combines the state vector and the objective vector to obtain a change to the first color corresponding to the desired change of the second color.